<style>
    .form-horizontal .control-label { width: 200px; }
    .form-horizontal .form-actions { padding-left: 200px;}
    /*.fix_for_tabs {
        right: 50px;
        top: -11px;
        left:auto
    }*/
</style>
<div class="container">

    <div class="page-header">

        <div class="row">

            <h1 class="span8">
                <?
                    switch ($post_action) {
                        case 'EDIT':
                            echo 'Edit descriptions';
                            break;
                        case 'NEW':
                            echo 'New descriptions';
                            break;

                    }
                ?>
            </h1>

            <span class="span4">

            </span>

        </div>

    </div>



    <ul class="nav nav-tabs" style="margin-bottom: 0;">

        <li class=""><a href="javascript:">General</a></li>
        <!--<li class=""><a href="javascript:">Price list</a></li>
        <li class=""><a href="javascript:">Reservations</a></li>   -->
        <li class="active"><a href="<?=base_url('objects/view_new_description/apartment')?>">Description</a></li>
        <!--<li class=""><a href="javascript:">Category</a></li>-->

    </ul>

    <div class="row">

        <div class="span12">

            <form class="form-horizontal" id="objectDescription_form" method="post" action="<?=base_url('objects/submit_post_description')?>" name="objectDescription_form">

                <fieldset>
                    <?
                        foreach ($groups as $group):?>

                        <div class="group clearfix">
                            <span class="group-title"> <?=$group['name']?> &nbsp;&nbsp;
                                <a id="trgr_addAttr" href="#" title="Add attribute" onclick="addAttributeDialog(base_url+'attributes_to_object/view_new/apartment/<?=$group['groups_ID']?>'); return false;"><i class="icon-plus"></i> Add attribute</a>&nbsp;&nbsp; 
                                <a id="trgr_editAttr" href="#" title="Edit attribute" onclick="editAttributesDialog(base_url+'attributes_to_object/view_edit/apartment/<?=$group['groups_ID']?>'); return false;"><i class="icon-wrench"></i> Edit attribute</a>&nbsp;&nbsp; 
                            </span>

                            <? 
                                
                                $html = $this->objects_model->build_form($type,$group['groups_ID']);
                                echo $html;

                            ?>

                        </div>

                        <?endforeach;
                    ?>
                </fieldset>
            </form>

        </div>

    </div>
    
    <div class="form-actions">
        <div class="row">
            <span class="span2 save"><button type="submit" class="btn btn-primary" disabled="disabled" id="b-object">Save changes</button></span>
        </div>

    </div>

</div> <!-- /container --> 